2. processing and sorting machine generic device integration 2

在上一个视频中,我们成功地将通用设备插入到我们的机器项目中,我们成功地配置了它们中的每一个。
And the last video we managed to insert the generic devices in our machine project, we successfully configure each of them.

在本视频中,我们将从修改提取站开始,以便实际使用这些通用设备。
And in this video, we will start by modifying the extraction station in order to actually use those generic devices.

因此,让我们回到我们编写的提取站,这里的目的是能够与活塞交互,而无需使用活塞传感器和致动,而仅使用通用设备。
So let's get back into it with our extraction station that we wrote and that the purpose here is to be able to interact with the piston without using the piston sensors and actuation and only using the generic device.

因此,从零的那一年开始,我们应该启用通用设备,这意味着我们应该设置我们应该使用此输入启用功能块,因为它之前可能被停用。
So starting from year when we are zero, we should enable the generic device, meaning that we should set we should enable the function block with this input because it may be deactivated before.

所以在这里我们可以写的是最好的设备,嗯,启用。
So here what we can write is bestand device that, um, enable.

通用设备应等于二。
Generic device should be equal to two.

好的。
OK.

然后,如果我们转到状态五,我们需要实际管理通用设备应该做什么,所以它应该简单地返回。
Then if we move to state five, we need to actually manage what to the generic device should do, so it should simply move back.

这是活塞向后移动的状态。
This is the state where the piston moves back.

所以为了做到这一点,我们不想使用这个可怕的,但我们想使用活塞装置。
So in order to do this, we do not want to use this horrible, but we want to use piston device.

设备来了,通过将其设置为强制,我们将向后移动,我们将等待,直到我们确定被禁用。
The device come and by setting it to force, we will move backward and we will wait until we are sure to be disabled.

这意味着活塞装置。
This means that piston device that.

设备状态应等于启用。
The device state should be equal to enabled.

所以等于残疾。
So equal to disabled.

这样,如果活塞已经被禁用,如果它被启用,我们将继续前进。
This way, if the piston was already disabled, we will just move forward, if it was enabled.

我们将进入禁用状态,然后进入残疾人状态。
We will passing onto the disabling state and then to the disabled.

好的。
OK.

那么当我们在这里的时候,我们应该。
Then when we are here, we should the.

呃,保留产品,保持和平禁用,但它已经被禁用,所以我们实际上可以删除这条线,这应该启用机场。
Uh, keep the product, keep the peace disabled, but it is already disabled so we can actually remove this line, which should enable the airfield.

这可能保持不变,因为我们在这里与机器传感器进行交互,但它们不属于原始设备。
And this may remain the same because we are interacting here with the machine sensors that are not and they do not belong to the original device.

好的,那么接下来我们需要进入训练就是训练。
OK, so then we need to get to the training is the training.

我们需要向前移动活塞。
We need to move the piston forward.

所以我们将使用活塞设备,设备命令等于true。
So we will use the piston device, the device command equal to true.

我们将继续努力,直到我们有了产品。
And we will keep going until we have a product here.

假设该设备已启用。
And let's say that the device is enabled.

所以首先,嗯,就是。
So first, um, it's the.

好吧,因为我们实际上只需要产品在那里,所以我们实际上只能使用该产品从不在那里取货,然后我们可以回到高状态。
That well, since we actually only need for the product to be there, we can actually only use the product for never pickup there and then we can move back to state high.

那么我们需要在这里对停止状态进行一些修改,所以首先是紧急情况。
Then we need to carry out some modifications over here for the stopping state, so first in the emergency.

我们需要做的实际上是,嗯,禁用,呃,活塞。
What we need to do is actually to, um, disable the, uh, piston.

所以。
So.

这意味着,如果向前移动,抱歉,如果按下紧急按钮,我们只需归零,启用通用设备 Sharat 的 Beston 设备将变得等于力量。
This means that if the move beston forward, sorry, if the emergency button is pressed, we simply needed to get to zero and the Beston device that enabled generic device Sharat shall become equal to force.

这实际上会导致活塞返回。
And this will actually lead the the the the piston to come back.

让我们看看是否在通用设备中禁用它。
Let's see if we disable it here in the generic device.

激活仅通过一次启用或启用。
The activation is through only one enabling or enabled.

所以这会导致激活也变成假的。
So this will lead to the activation also to become false.

这正是我们想要的。
That is exactly what we want.

那么这里的停止状态我们需要移除这部分,这意味着活塞要么完全向前,要么完全向后。
Then the stopping state here we will need to remove this part that meant that the piston was either, um, completely forward or completely backward.

所以我们需要做的是,如果设备状态抱歉,活塞设备状态,该设备状态等于启用或等于禁用,那么我们实际上已经正确停止了。
So what we need to do is say that if the device state sorry, the piston device state, that device state is equal to enabled or it is equal to disabled, then we have actually stopped the correctly.

在这种情况下,我们将回到零。
And we shall move back to zero in this case.

我们将保持通用设备开启,因为我们停下来了,我们希望保持在我们到达的位置。
We will maintain the generic device on because we stopped and we want to remain in the position that we reached.

所以我的意思是,这应该是为这个,呃,站完成的,让我们看看,嗯,Brouse 交叉引用,看看我们在哪里使用这些变量。
So it is I mean, this should be should be done for the this, uh, station, let's look at the, um, at the Brouse cross-reference to see where we are using these variables.

而且它们仅在主程序中使用。
And they are only being used in the main program.

在这里,让我看看。
Here, let me see.

主要问题是旧的,所以我们现在不会再使用它,所以我们只在主要抗议计划中使用它,同样的情况也适用于,嗯,定位 SACEUR 的业务。
The main problem was the old one, so we are not using it again right now, so we only use this in the main protest program and the same goes for the, um, the business that position SACEUR.

这样我们就可以上网了,我们应该会看到它像以前一样工作正常。
So we can go online and we should see it working fine as it was working before.

那么我们开始吧。
So we start.

我们还可以在这里查看通用设备输出。
We can look also here at the generic device output to see.

它是如何工作的,是否正在发送我们希望通过设备听到的反馈。
How it is working, if it is sending the feedback that we want to hear with the device.

状态。
State.

启动,禁用启用。
Start, it is disabled enabling.

并且会禁用,好吗?
And will disabling, OK?

所以这个站工作得很好,实际上,它们现在不工作,因为使用通用设备,我们正在强制激活的值。
So this station works fine, actually, they are the ones that are not working right now because with the generic devices, we are forcing the values of the activation.

所以现在什么都没有动。
So nothing is moving right now.

与其他站有什么关系?
What what concerns the other station?

因此,在此之后,我们将在下一个视频中继续讨论杠杆装置。
So after this, we will move on to the lever device and in the next video.